package com.itcast.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itcast.pojo.Sku;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

/**
 * @Author JinX
 * @Date 1/14/2021 10:59 AM
 * @Version 1.0
 */
public interface SkuService extends IService<Sku> {

    /**
     * 分页查找
     * @param start
     * @param size
     * @return
     */
    List<Sku> findByPage(int start ,int size);

    /**
     * 通过id在es中找找
     * @param skuId
     * @return
     * @throws IOException
     */
    Sku findById(String skuId) throws IOException;

    /**
     * 根据名字查询结果
     * @param name
     * @return
     * @throws IOException
     */
    List<Sku> findByName(String name) throws IOException;
}
